﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 关于卖家库存余额的信息
    /// </summary>
    /// 
    public class ProductInfoStocksDTO
    {
        public string cursor { get; set; }
        public int total { get; set; }
        public List<ProductInfoStocks> items { get; set; }

    }


    public class ProductInfoStocks
    {
        public string RowId { get; set; }
        /// <summary>
        /// id	
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 卖家系统中的商品识别符——货号	
        /// </summary>
        public string offer_id { get; set; }
        /// <summary>
        /// 商品识别符。
        /// </summary>
        public string product_id { get; set; }
        /// <summary>
        /// 商品SKU	
        /// </summary>
        public List<Stocks> stocks { get; set; }
    }

    public class Stocks
    {
        public string RowId { get; set; }
        /// <summary>
        /// id	
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 店铺id	
        /// </summary>
        public string sellerId { get; set; }
        /// <summary>
        /// 卖家系统中的商品识别符——货号	
        /// </summary>
        public string msku { get; set; }
        /// <summary>
        /// 商品识别符。
        /// </summary>
        public string product_id { get; set; }

        /// <summary>
        /// 商品SKU	
        /// </summary>
        public string sku { get; set; }
        /// <summary>
        /// 仓库类型
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 库存数量	
        /// </summary>
        public string present { get; set; }
        /// <summary>
        /// 预定数量	
        /// </summary>
        public string reserved { get; set; }
        /// <summary>
        /// 包装类型SHIPMENT_TYPE_GENERAL — 普通商品；SHIPMENT_TYPE_BOX — 盒子；SHIPMENT_TYPE_PALLET — 托盘。
        /// </summary>
        private string _shipment_type;
        public string shipment_type
        {

            get
            {
                return _shipment_type;
            }

            set
            {
                if (value == "SHIPMENT_TYPE_GENERAL") _shipment_type = "普通商品";
                else if (value == "SHIPMENT_TYPE_BOX") _shipment_type = "盒子";
                else if (value == "SHIPMENT_TYPE_PALLET") _shipment_type = "托盘";
                else _shipment_type = value;

            }


        }
        /// <summary>
        /// 在途数量	
        /// </summary>
        public string InTransitQty { get; set; }
    }
}
